package com.heima.behavior.controller.v1;

import com.heima.behavior.Service.LikesService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.Dtos.AllDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1")
public class NotLikeController {

    @Autowired
    private LikesService likesService;

    //不喜欢
    @PostMapping("/un_likes_behavior")
    public ResponseResult UnLikes(@RequestBody AllDto dto){
        return likesService.UnLikes(dto);
    }

    //阅读
    @PostMapping("/read_behavior")
    public ResponseResult readBehavior(@RequestBody AllDto dto){
        return likesService.readBehavior(dto);
    }
}
